package Test00;

import java.io.File;
import java.net.SocketTimeoutException;
import java.util.Scanner;

public class Test03 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入目录名：");
        String dir = scan.nextLine();
        File ml = new File(dir);
        if (ml.exists()){
            System.out.println("该目录已存在");
        }else{
            ml.mkdirs();
            System.out.println("该目录已创建");
        }
        Scanner scan1 = new Scanner(System.in);
        System.out.println("请输入要删除的目录名");

        if (ml.exists()){
            ml.delete();
            System.out.println("已删除");
        }else{
            System.out.println("文件不存在");
        }



    }
}
